// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.List;
#pragma once
#include "../SQLStatementImpl.h"
#include "SQLDDLStatement.h"

class SQLAlterMaterializedViewStatement : virtual public SQLStatementImpl /*implements SQLAlterStatement*/
{
public:
  SQLName_ptr name;

  BOOL_ptr refreshFast;
  BOOL_ptr refreshComplete;
  BOOL_ptr refreshForce;
  BOOL_ptr refreshOnCommit;
  BOOL_ptr refreshOnDemand;
  BOOL_ptr refreshStartWith;
  BOOL_ptr refreshNext;
  SQLExpr_list_ptr partitions; // odps

  BOOL_ptr enableQueryRewrite;

  SQLExpr_ptr startWith;
  SQLExpr_ptr next;

  // for ADB
  BOOL_ptr refreshOnOverWrite;
  BOOL_ptr rebuild;

  SQLAlterMaterializedViewStatement();
  SHAREDOBJECT(SQLAlterMaterializedViewStatement);
  SQLName_ptr getName();

  void setName(SQLName_ptr name);

  BOOL_ptr isRefresh();

  BOOL_ptr isRefreshFast();

  void setRefreshFast(BOOL_ptr refreshFast);

  BOOL_ptr isRefreshComplete();

  void setRefreshComplete(BOOL_ptr refreshComplete);

  BOOL_ptr isRefreshForce();

  void setRefreshForce(BOOL_ptr refreshForce);

  BOOL_ptr isRefreshOnCommit();

  void setRefreshOnCommit(BOOL_ptr refreshOnCommit);

  BOOL_ptr isRefreshOnDemand();

  void setRefreshOnDemand(BOOL_ptr refreshOnDemand);

  BOOL_ptr isRefreshOnOverWrite();

  void setRefreshOnOverWrite(BOOL_ptr refreshOnOverWrite);

  BOOL_ptr isRefreshStartWith();

  void setRefreshStartWith(BOOL_ptr refreshStartWith);

  BOOL_ptr isRefreshNext();

  void setRefreshNext(BOOL_ptr refreshNext);

  BOOL_ptr getEnableQueryRewrite();

  void setEnableQueryRewrite(BOOL_ptr enableQueryRewrite);

  SQLExpr_ptr getStartWith();

  void setStartWith(SQLExpr_ptr x);

  SQLExpr_ptr getNext();

  void setNext(SQLExpr_ptr x);

  BOOL_ptr isRebuild();

  void setRebuild(BOOL_ptr rebuild);

  SQLExpr_list_ptr getPartitions();

  // @Override
  void accept0(SQLASTVisitor_ptr visitor);

  // @Override
  SQLDDLStatement::DDLObjectType getDDLObjectType();
};
